package com.information.manage.basic.controller;

import com.information.manage.basic.model.query.FindStaffByDepQuery;
import com.information.manage.basic.model.vo.DepMappingStaffVO;
import com.information.manage.basic.common.result.Result;
import com.information.manage.basic.service.RelStaffDepService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "部门员工")
@RestController
@RequestMapping("/rel/staff/dep")
public class RelStaffDepController {

    @Resource
    private RelStaffDepService relStaffDepService;

    @GetMapping("/query/staff/by/depId")
    @ApiOperation(value = "根据部门查询员工", notes = "根据部门查询员工")
    public Result<List<DepMappingStaffVO>> findStaffByDepId(FindStaffByDepQuery findStaffByDepQuery){
        return relStaffDepService.findStaffByDepId(findStaffByDepQuery);
    }

}
